package com.mingtu.guards.utils;

import com.amap.api.maps.model.BitmapDescriptor;
import com.amap.api.maps.model.BitmapDescriptorFactory;
import com.amap.api.maps.model.LatLng;
import com.amap.api.maps.model.MarkerOptions;

import java.util.ArrayList;

/**
 * @ClassName :
 * @Author : wkk
 * @Date : 2023-3-16 11:03:00
 * @Email : 1281573890@qq.com
 * @Eescription :
 */
public class MarkerOptionsUtils {

    public static MarkerOptions getMarkerOptions1(LatLng location, String title, int infoWindowOffsetY, int icon) {
        MarkerOptions markerOptions = new MarkerOptions()
                .position(location)
                .title(title)
                .anchor(0.4f, 0.8f)
                .setInfoWindowOffset(0, infoWindowOffsetY)
                .icon(BitmapDescriptorFactory.fromResource(icon));
        return markerOptions;
    }


    public static MarkerOptions getMarkerOptions2(LatLng location, String title, int infoWindowOffsetY, ArrayList<BitmapDescriptor> giflist) {
        MarkerOptions markerOptions = new MarkerOptions()
                .position(location)
                .period(5)
                .title(title)
                .anchor(0.4f, 0.8f)
                .setInfoWindowOffset(0, infoWindowOffsetY)
                .icons(giflist);
        return markerOptions;
    }

}
